<f:view
		xmlns="http://www.w3.org/1999/xhtml"
		xmlns:h="http://java.sun.com/jsf/html"
		xmlns:f="http://java.sun.com/jsf/core"
		xmlns:a4j="http://richfaces.org/a4j"
		xmlns:rich="http://richfaces.org/rich"
		xmlns:ui="http://java.sun.com/jsf/facelets"
		xmlns:itdep="http://itdep.bsuir.by/jsf"
		>

	<ui:decorate template="/facelets/template/mainTemplate.xhtml">
		<ui:define name="title">#{commonBundle.title}</ui:define>
		<ui:define name="center">
			<ui:decorate template="/facelets/template/centerTemplate.xhtml">
				<ui:define name="content">
					<ui:decorate template="/facelets/template/simpleTableTemplate.xhtml">
						<ui:param name="showAddLink" value="true"/>
						<ui:param name="actionBean" value="#{employeeBean}"/>
						<ui:param name="idPrefix" value="employeeTable"/>
						<ui:param name="colNum" value="1"/>
						<ui:define name="beforeTable">

						</ui:define>

						<ui:define name="tableContext">
							<rich:column sortBy="#{employeeBean.sortProperty}" sortOrder="#{employeeBean.ordering}">
								<f:facet name="header">
									<h:outputText value="#{personBundle.lastNameMiddleNameFirstName}"/>
								</f:facet>

								<div class="graphicImageInList">
									<h:graphicImage url="/img/Nibbler.png" styleClass="graphicImage"
													rendered="#{empty record.personPhoto}"/>
									<a4j:mediaOutput element="img" styleClass="graphicImage noBorder"
													 rendered="#{not empty record.personPhoto}"
													 value="#{record.personPhoto.photo}"
													 createContent="#{personPhotoBean.paint}"/>
								</div>
								<h:outputText value="#{record.lastName} #{record.firstName} #{record.middleName}"
											  style="font-size:2em; width:50%"/>
								<rich:spacer width="30"/>
								<h:outputText value="#{personBundle.birthDate} "/>
								<h:outputText value="#{record.birthDate}">
									<f:convertDateTime pattern="dd.MM.yyyy" timeZone="EET"/>
								</h:outputText>
								<br/>
								<h:outputText value="#{personBundle.education} :" styleClass="fieldName"/>
								<itdep:entityOutput value="#{record.degree}" format="{i18n.description} "
													locale="#{translationBean.locale}"/>
								<itdep:entityOutput value="#{record.education}" format="{i18n.description} "
													locale="#{translationBean.locale}"/>
								<itdep:entityOutput value="#{record.rank}" format="({i18n.description})"
													locale="#{translationBean.locale}"/>
								<br/>
								<a4j:commandLink value="#{commonBundle.details}" action="#{actionBean.showDetails}"
												 reRender="content" immediate="true"/>
								<rich:spacer width="20"/>
								<a4j:commandLink value="#{commonBundle.delete}" action="#{actionBean.delete}"
												 reRender="content" immediate="true"/>
							</rich:column>
						</ui:define>
					</ui:decorate>
				</ui:define>
				<ui:define name="search">
					<a4j:form id="#{idPrefix}SearchForm">
						<a4j:queue requestDelay="50"/>
						<h:panelGrid>
							<h:outputText value="#{personBundle.lastName} "/>
							<h:inputText value="#{employeeBean.filter.lastName}"
										 maxlength="100">
								<a4j:support event="onkeyup" reRender="employeeTableTablePanel"/>
							</h:inputText>
						</h:panelGrid>
					</a4j:form>
				</ui:define>
			</ui:decorate>
		</ui:define>
	</ui:decorate>
</f:view>